package virtualstock.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "portfolio", schema = "vstock")
public class Portfolio implements Serializable {
	@Id
	private Long portfolioID;
	
	// the following ID reference should be changed to @JoinColumn, and use game & player instead
	@Column(name="gameID")
	private Long gameID;
	
	@Column(name="playerID")
	private Long playerID;
	
	@Column(name="balance")
	private BigDecimal balance;

	private static final long serialVersionUID = 1L;

	public Portfolio(){
		super();
	}
	public Portfolio(
			Long gameID, 
			Long playerID,
			BigDecimal balance) {
		this.gameID = gameID;
		this.playerID = playerID;
		this.balance = balance;
	}

	public Long getPortfolioID() {
		return this.portfolioID;
	}

	public void setPortfolioID(Long portfolioID) {
		this.portfolioID = portfolioID;
	}

	public Long getGameID() {
		return this.gameID;
	}

	public void setGameID(Long gameID) {
		this.gameID = gameID;
	}

	public Long getPlayerID() {
		return this.playerID;
	}

	public void setPlayerID(Long playerID) {
		this.playerID = playerID;
	}

	public BigDecimal getBalance() {
		return this.balance;
	}

	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}

}
